package com.bobo.util;

/**
 * Created by bobo on 16-11-13.
 */
public class PagerContext {

    private static ThreadLocal<Integer> pageSize = new ThreadLocal<>();
    private static ThreadLocal<Integer> current = new ThreadLocal<>();



    public static Integer getPageSize() {

        return pageSize.get();
    }

    public static void setPageSize(Integer pageSize) {

        PagerContext.pageSize.set(pageSize);
    }

    public static Integer getCurrent() {
        return current.get();
    }

    public static void setCurrent(Integer current) {
        PagerContext.current.set(current);
    }

    public static void removeCurrent() {
        current.remove();
    }

    public static void removePageSize() {
        pageSize.remove();
    }

}
